package xmlcommandset;

public class IntentBinding {
	IntentAction intent_action = new IntentAction();
	ComponentID comp_id = new ComponentID();
	private String begin_tag = "<intentBinding>";
	private String end_tag = "</intentBinding>";
	

	public IntentAction getIntent_action() {
		return intent_action;
	}

	public void setIntent_action(IntentAction intent_action) {
		this.intent_action = intent_action;
	}

	public ComponentID getComp_id() {
		return comp_id;
	}

	public String getBegin_tag() {
		return begin_tag;
	}

	public String getEnd_tag() {
		return end_tag;
	}

	public void setEnd_tag(String end_tag) {
		this.end_tag = end_tag;
	}

	public boolean isEmpty(){
		return (intent_action.isEmpty() && comp_id.isEmpty())? true : false;
	}
	
	public String getIntentBinding(){
		return intent_action.getIntentAction() + "\n" + comp_id.getComponentID();
	}
	
	public void printIntentBinding() {
		System.out.println(begin_tag);
		intent_action.printIntentAction();
		comp_id.printComponentID();
		System.out.println(end_tag);
	}

}
